﻿function MouseEnter(row, className) {
    if (row.getAttribute("Selected") == "true") return;
    row.className = className;
}

function MouseLeave(row) {
    if (row.getAttribute("Selected") == "true") return;
    row.className = row.getAttribute("OriginalClassName");
}

function MouseDown(row, className) {
    if (row.getAttribute("Selected") == "true") {
        row.className = row.getAttribute("OriginalClassName");
        row.setAttribute("Selected", "false");
    }
    else {
        row.className = className;
        row.setAttribute("Selected", "true");
    }
}

function scrollHorizontal(e) {
    var h = document.getElementById(gHeader); /* header row, top right */
    var c = document.getElementById(bodyTable); /* main content, bottom right */
    h.scrollLeft = e.scrollLeft;
    c.scrollLeft = e.scrollLeft;
}

//function HotKeysGrid(event) {
//    //ctrl + ->
//    if (event.ctrlKey && event.which == 39) {
//        if ($get("btnNext") != null) {
//            $get("btnNext").click();
//        }
//    }

//    //ctrl + <-
//    if (event.ctrlKey && event.which == 37) {
//        if ($get("btnPrev") != null) {
//            $get("btnPrev").click();
//            return false;
//        }
//    }

//    //ctrl + Fin
//    if (event.ctrlKey && event.which == 35) {
//        if ($get("btnLast") != null) {
//            $get("btnLast").click();
//            return false;
//        }
//    }

//    //ctrl + Ini
//    if (event.ctrlKey && event.which == 36) {
//        if ($get("btnFirst") != null) {
//            $get("btnFirst").click();
//            return false;
//        }
//    }
//}